<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateConvertDemandsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('convert_demands', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->bigInteger('convert_formula_id')->index()->comment('合成公式ID');
            $table->bigInteger('product_id')->index()->comment('合成所需商品ID');
            $table->string('contract_address', 64)->index()->comment('资产唯一标识');
            $table->integer('quantity')->comment('合成所需数量');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('convert_demands');
    }
}
